<?php
$id=$row['id'];
if($row['systatus'] == 1){
    $status = '营业中';
}else{
    $status = '休业中';
}?>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <?php include_once MvcReg::$_moduleName . '/views/layout/head.php'; ?>
    <style>.col-md-2, .col-md-3{padding:0}</style>
</head>

<body>
<?php include_once MvcReg::$_moduleName . '/views/layout/woody-prompt.php'; ?>
<?php include_once MvcReg::$_moduleName . '/views/layout/header.php'; ?>
<div id="main">
    <div class="container-fluid">
        <div class="row">
            <div class="col-md-2">
                <?php include_once MvcReg::$_moduleName . '/views/layout/left_menu.php'; ?>
            </div>
            <div class="col-md-10">
                <div class="right-content">
                    <h3>
                        <ol class="breadcrumb"><li><a href="?md=manage&cl=store&at=storelist"><i class="fa fa-dashboard"></i><?php echo $menu["breadcrumb_current"]?></a><li class="active"><?php echo ((!empty($id) && ($id > 0)) > 0 ? '%{EDIT}%' : '%{ADD}%')?></li></li></ol>
                    </h3>
                    <br>
                    <form class="form-horizontal" action="<?php echo $url?>" method="post" autocomplete="off">
                        <input type="hidden" name="store_id"  value="<?php echo $row['id'] ?>">
                        <div class="row">
                            <div class="col-sm-12">
                                <dl class="dl-horizontal">
                                    <div class="form-group">
                                        <label for="addtime" class="col-md-2 control-label"> 门店编号：</label>
                                        <div class="col-md-10">
                                            <label class="control-label"> <?php echo $row['store_id'] ?></label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="addtime" class="col-md-2 control-label">
                                            密码： 
                                        </label>
                                        <div class="col-md-3">
                                            <input type="password" id="pwd" name="pwd" value="" class="form-control " placeholder=""/>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="addtime" class="col-md-2 control-label">
                                             手机号：
                                        </label>
                                        <div class="col-md-3">
                                            <input type="text" name="phone" value="<?php echo $row['phone'] ?>" id="phone" class="form-control " placeholder="" required />
                                        </div>
                                    </div>


                                    <!--                                    快递信息                        -->
                                    <br/>
                                    <hr/>
                                    <div class="form-group" style="text-align: center">
                                        <div class="col-md-6"  style="font-weight: 800;font-size: 20px;">闪送</div>
                                    </div>

                                    <div class="form-group">
                                        <label for="addtime" class="col-md-2 control-label">
                                            <dt> 商户编号：</dt>
                                        </label>
                                        <div class="col-md-3">
                                            <input type="text" name="Express[ss_clientId]" value="<?php echo $row['ss_clientId'] ?>"  class="form-control " placeholder=""  />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="addtime" class="col-md-2 control-label">
                                            <dt> 商户ID：</dt>
                                        </label>
                                        <div class="col-md-3">
                                            <input type="text" name="Express[ss_shopId]" value="<?php echo $row['ss_shopId'] ?>"  class="form-control " placeholder=""  />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="addtime" class="col-md-2 control-label">
                                            <dt> 商户密钥：</dt>
                                        </label>
                                        <div class="col-md-3">
                                            <input type="text" name="Express[ss_clientSecret]" value="<?php echo $row['ss_clientSecret'] ?>"  class="form-control " placeholder=""  />
                                        </div>
                                    </div>

                                    <br/>
                                    <hr/>
                                    <div class="form-group" style="text-align: center">
                                        <div class="col-md-6"  style="font-weight: 800;font-size: 20px;">达达</div>
                                    </div>

                                    <div class="form-group">
                                        <label for="addtime" class="col-md-2 control-label">
                                            <dt> 商户编号(source_id)：</dt>
                                        </label>
                                        <div class="col-md-3">
                                            <input type="text" name="Express[dd_source_id]" value="<?php echo $row['dd_source_id'] ?>"  class="form-control " placeholder=""  />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="addtime" class="col-md-2 control-label">
                                            <dt> 应用Key(app_key)：</dt>
                                        </label>
                                        <div class="col-md-3">
                                            <input type="text" name="Express[dd_app_key]" value="<?php echo $row['dd_app_key'] ?>"  class="form-control " placeholder=""  />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="addtime" class="col-md-2 control-label">
                                            <dt> 应用密钥(app_secret)：</dt>
                                        </label>
                                        <div class="col-md-3">
                                            <input type="text" name="Express[dd_app_secret]" value="<?php echo $row['dd_app_secret'] ?>"  class="form-control " placeholder=""  />
                                        </div>
                                    </div>
                                    <br/>
                                    <hr/>

                                    <div class="form-group" style="text-align: center">
                                        <div class="col-md-6"  style="font-weight: 800;font-size: 20px;">今日达</div>
                                    </div>
                                    <div class="form-group">
                                        <label for="addtime" class="col-md-2 control-label">
                                            <dt> 签名：</dt>
                                        </label>
                                        <div class="col-md-3">
                                            <input type="text" name="Express[jrd_sign]" value="<?php echo $row['jrd_sign'] ?>"  class="form-control " placeholder=""  />
                                        </div>
                                    </div>
                                    <br/>
                                    <hr/>




                                    <br/>
                                    <hr/>
                                    <div class="form-group" style="text-align: center">
                                        <div class="col-md-6"  style="font-weight: 800;font-size: 20px;">UU</div>
                                    </div>

                                    <div class="form-group">
                                        <label for="uu_app_id" class="col-md-2 control-label">
                                            <dt> UU跑腿-APPID：</dt>
                                        </label>
                                        <div class="col-md-3">
                                            <input type="text" name="Express[uu_app_id]" value="<?php echo $row['uu_app_id'] ?>"  class="form-control " placeholder=""  />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="uu_app_key" class="col-md-2 control-label">
                                            <dt> UU跑腿-APPKEY：</dt>
                                        </label>
                                        <div class="col-md-3">
                                            <input type="text" name="Express[uu_app_key]" value="<?php echo $row['uu_app_key'] ?>"  class="form-control " placeholder=""  />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="uu_open_id" class="col-md-2 control-label">
                                            <dt>  UU跑腿-OPENID：</dt>
                                        </label>
                                        <div class="col-md-3">
                                            <input type="text" name="Express[uu_open_id]" value="<?php echo $row['uu_open_id'] ?>"  class="form-control " placeholder=""  />
                                        </div>
                                    </div>
                                    <br/>
                                    <hr/>


                                    <br/>
                                    <hr/>
                                    <div class="form-group" style="text-align: center">
                                        <div class="col-md-6"  style="font-weight: 800;font-size: 20px;">365跑腿</div>
                                    </div>

                                    <div class="form-group">
                                        <label for="slw_app_id" class="col-md-2 control-label">
                                            <dt> 365跑腿-user365Id：</dt>
                                        </label>
                                        <div class="col-md-3">
                                            <input type="text" name="Express[user365Id]" value="<?php echo $row['user365Id'] ?>"  class="form-control " placeholder=""  />
                                        </div>
                                    </div>

                                    <br/>
                                    <hr/>

                                    <!--                                    快递信息                        -->


                                    <div class="form-group">
                                        <label for="addtime" class="col-md-2 control-label"> 门店名称：</label>
                                        <div class="col-md-10">
                                            <label class="control-label"> <?php echo $row['storename'] ?></label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="addtime" class="col-md-2 control-label"> 公司名称：</label>
                                        <div class="col-md-10">
                                            <label class="control-label"> <?php echo $row['company_id'] ?></label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="addtime" class="col-md-2 control-label"> 门店电话：</label>
                                        <div class="col-md-10">
                                            <label class="control-label"> <?php echo $row['tel'] ?></label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="addtime" class="col-md-2 control-label"> 地址信息：</label>
                                        <div class="col-md-10">
                                            <label class="control-label"><?php echo $row['front_province'] .$row['front_city'].$row['front_area'].$row['address'] ?></label>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="addtime" class="col-md-2 control-label"> 营业状态：</label>
                                        <div class="col-md-10">
                                            <label class="control-label"> <?php echo Data::$_store_business_status[$row['business_status']] ?></label>
                                        </div>
                                    </div>

                                </dl>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="stacode" class="col-md-2 control-label">
                            </label>
                            <div class="col-md-4">
                                <button type="submit" id="sub"  class="btn btn-success">保存</button>
                            </div>
                            <span class="col-md-6"></span>
                        </div>
                        <input type="hidden" id="page" name="page" value="<?php echo $page?>"/>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    $("#sub").click(function () {
        var phone = $('#phone').val();
        if(!(/^1[3456789]\d{9}$/.test(phone))){
            alert("手机号码有误，请重填");
            return false;
        }
    });

</script>

<?php include_once MvcReg::$_moduleName . '/views/layout/footer.php'; ?>
</body>
</html>

